<?php
/**
 * Created by PhpStorm.
 * User: longyuanmoqi
 * Date: 2016/10/27
 * Time: 11:06
 */
?>
<?php if(!defined('APP'))die('error');?>
<!doctype html>
<html>
<meta charset="UTF-8">
<head>
    <style>
        table{width：100p%;height:auto;border: 1px solid black;font-size: 20px;text-align: left;}
        tr{width: 100%;height: 30px;}
    </style>
    <title>员工信息列表</title>
</head>
<body>
<div><h1 align="center">员工信息列表</h1></div>
<table align="center">
    <tr>
        <th>ID</th><th>姓名</th><th>所属部门</th><th>出生日期</th><th>入职时间</th><th>相关操作</th>
    </tr>
    <?php if (!empty($emp_info)){?>
        <?php  foreach ($emp_info as $row){?>
            <tr>
                <td width="5%"><?php echo $row['e_id'];?></td>
                <td width="10%"><?php echo $row['e_name'];?></td>
                <td width="15%"><?php echo $row['e_dept'];?></td>
                <td width="25%"><?php echo $row['date_of_birth'];?></td>
                <td width="25%"><?php echo $row['date_of_entry'];?></td>
                <td width="15%">
                    <div><span><a href="<?php echo './empUpdate.php?e_id='.$row['e_id']?>"> 编辑</a>&nbsp;&nbsp;
                                <a href="<?php echo './emp_Del.php?e_id='.$row['e_id']?>"> 删除</a></span>
                    </div>
                </td>
            </tr>
        <?php }?>
    <?php }else{?>
        <tr><td colspan="6">暂无员工数据！</td></tr>
    <?php }?>
</table>
<div align="center"><a href="./empAdd.php">添加成员</a> </div>
</body>
</html>



